#ifndef DESIGN_ITERATOR_H_
#define DESIGN_ITERATOR_H_
#include <string>
#include <vector>

namespace iteratored{

class MenuItem
{
public :
    MenuItem(std::string n, std::string d, bool v, double p):m_name(n),m_description(d),m_vegetarian(v),m_price(p){}
public:
    std::string getName();
    std::string getDescription();
    bool getVegetarian();
    double getPrice();
private:
    std::string m_name;
    std::string m_description;
    bool m_vegetarian;
    double m_price;
};

class Iterator
{
public:
    virtual bool hasNext() = 0;
    virtual MenuItem next() = 0;
};

class Menu
{
public:
    virtual Iterator* createIterator() = 0;
};

class PancakeHouseMenu : public Menu
{
public:
    PancakeHouseMenu();
public:
    virtual Iterator* createIterator();
public:
    std::vector<MenuItem> m_menuitems;
};

class DinerMenu : public Menu
{
public:
    DinerMenu();
public:
    virtual Iterator* createIterator();
public:
    std::vector<MenuItem> m_menuitems;
};

class PancakeHouseMenuIterator:public Iterator
{
public:
    PancakeHouseMenuIterator(std::vector<MenuItem> m);
public:
    virtual bool hasNext();
    virtual MenuItem next();
private:
    int pos;
    std::vector<MenuItem> m_menuitems;
};

class DinerMenuIterator:public Iterator
{
public :
    DinerMenuIterator(std::vector<MenuItem> m);
public:
    virtual bool hasNext();
    virtual MenuItem next();
private:
    int pos;
    std::vector<MenuItem> m_menuitems;
};

class Waitress
{
public:
    Waitress(Menu* p, Menu* d);
public:
    void PrintMenu();
private:
    void printMenu(Iterator* i);
private:
    Menu* m_pancake;
    Menu* m_diner;
};

}

#endif // DESIGN_ITERATOR_H_
